import React from 'react';
import {Navigate, NavLink, Outlet} from "react-router-dom";

function My(props) {
    // if(localStorage.getItem("token")){
    //     return (
    //         <div>个人中心</div>
    //     );
    // }
    // return <Navigate to={"/"}/>

    return (
        <div>
            <nav>
                <NavLink className={({isActive})=>isActive?"a-active":"a-link"} to={"/my/one"}>one</NavLink>
                <NavLink className={({isActive})=>isActive?"a-active":"a-link"} to={"/my/two/0/0.html"}>two</NavLink>
            </nav>
            <Outlet/>
        </div>
    );

}

export default My;